package org.stream.answerduel.repository;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.stream.answerduel.entity.Friend;


/**
 * @author 郭榕
 * @date 2019/7/17 15:56
 * 功能描述: 对好友的操作;
 *
 */
public interface FriendRepository extends JpaRepository<Friend, Long> {

    @Query(nativeQuery = true, value = "SELECT * FROM t_friend WHERE user_id = ?1 and friend_id = ?2")
    Friend findFriendByUserIdAndFriendId(Long userId , Long friendId);

}
